# -*- coding: utf-8 -*-
"""
Created on Tue Mar  3 11:57:49 2020

@author: Monstare
"""

import geopandas as gpd
import pandas as pd
from shapely.geometry import Point


o=['start_lng','start_lat']
d=['end_lng','end_lat']


def readdata(oord):
    bike=pd.read_csv("..\\data\\odcsv\\njodcsv.csv")
    bike["geometry"] = bike.apply(lambda x: Point(x[oord]),axis=1)
    bike = gpd.GeoDataFrame(bike)
    bike.crs={'init':'epsg:4326'}
    if oord==o:
        name="o"
    else:
        name="d"
    bike.to_file("..\\data\\result\\"+str(name)+".shp",encoding = "utf-8")
    return str(name)+".shp"
    
pointname=readdata(o)
    
    
    